<?php
//系统管理
Route::group(['prefix' => 'system', 'namespace' => 'System', 'as' => 'system.'], function () {

    //系统设置
    Route::resource('config', 'ConfigController', ['only' => ['index', 'update']]);

    //清除缓存
    Route::group(['prefix' => 'cache'], function () {
        Route::get('index', 'CacheController@index')->name('cache.index');
        Route::delete('destroy', 'CacheController@destroy')->name('cache.destroy');
    });


    //用户管理
    Route::group(['prefix' => 'user'], function () {
        //改变属性
        Route::patch('change', 'UserController@change')->name('user.change');
    });
    Route::resource('user', 'UserController');


    //用户组管理
    Route::resource('role', 'RoleController');

    //菜单与权限
    Route::patch('permission/sort_order', 'PermissionController@sort_order')->name('permission.sort_order');
    Route::resource('permission', 'PermissionController');

});